﻿<%@ WebHandler Language="C#" Class="doFeedBack" %>

using System;
using System.Web;
using System.Web.SessionState;

public class doFeedBack : IHttpHandler,IRequiresSessionState {
    protected BLL.FeedBack bllfb = new BLL.FeedBack();
    public void ProcessRequest (HttpContext context) {
        if (context.Request["message"] != null)
        {
            string message = context.Request["message"].ToString();
            int userid = ((MODEL.Users)context.Session["currentUser"]).UId;
            if (bllfb.feedBack(userid, message))
            {
                context.Response.Write("yes");
            }
            else
            {
                context.Response.Write("no");
            }
        }
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}